package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the tarrange database table.
 * 
 */
@Entity
@NamedQuery(name="Tarrange.findAll", query="SELECT t FROM Tarrange t")
public class Tarrange implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int tarrangeid;

	private int tarrangearr;

	@Temporal(TemporalType.TIMESTAMP)
	private Date tarrangeend;

	private String tarrangename;

	private String tarrangeremarks;

	@Temporal(TemporalType.TIMESTAMP)
	private Date tarrangestart;

	private int tarrangestnums;

	private int tarrangetime;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-many association to Texam
	@ManyToMany
	@JoinTable(
		name="kaojuan_anpai"
		, joinColumns={
			@JoinColumn(name="tarrangeid")
			}
		, inverseJoinColumns={
			@JoinColumn(name="texamid")
			}
		)
	private List<Texam> texams;

	//bi-directional many-to-one association to Texaminee
	@ManyToOne
	@JoinColumn(name="tmineeid")
	private Texaminee texaminee;

	//bi-directional many-to-many association to Trepeat
	@ManyToMany
	@JoinTable(
		name="bukao_anpai"
		, joinColumns={
			@JoinColumn(name="tarrangeid")
			}
		, inverseJoinColumns={
			@JoinColumn(name="trepeatid")
			}
		)
	private List<Trepeat> trepeats;

	//bi-directional many-to-one association to Ttest
	@ManyToOne
	@JoinColumn(name="ttestid")
	private Ttest ttest;

	//bi-directional many-to-many association to Tasmission
	@ManyToMany(mappedBy="tarranges")
	private List<Tasmission> tasmissions;

	//bi-directional many-to-one association to Toverview
	@OneToMany(mappedBy="tarrange")
	private List<Toverview> toverviews;

	//bi-directional many-to-one association to Tscene
	@OneToMany(mappedBy="tarrange")
	private List<Tscene> tscenes;

	public Tarrange() {
	}

	public int getTarrangeid() {
		return this.tarrangeid;
	}

	public void setTarrangeid(int tarrangeid) {
		this.tarrangeid = tarrangeid;
	}

	public int getTarrangearr() {
		return this.tarrangearr;
	}

	public void setTarrangearr(int tarrangearr) {
		this.tarrangearr = tarrangearr;
	}

	public Date getTarrangeend() {
		return this.tarrangeend;
	}

	public void setTarrangeend(Date tarrangeend) {
		this.tarrangeend = tarrangeend;
	}

	public String getTarrangename() {
		return this.tarrangename;
	}

	public void setTarrangename(String tarrangename) {
		this.tarrangename = tarrangename;
	}

	public String getTarrangeremarks() {
		return this.tarrangeremarks;
	}

	public void setTarrangeremarks(String tarrangeremarks) {
		this.tarrangeremarks = tarrangeremarks;
	}

	public Date getTarrangestart() {
		return this.tarrangestart;
	}

	public void setTarrangestart(Date tarrangestart) {
		this.tarrangestart = tarrangestart;
	}

	public int getTarrangestnums() {
		return this.tarrangestnums;
	}

	public void setTarrangestnums(int tarrangestnums) {
		this.tarrangestnums = tarrangestnums;
	}

	public int getTarrangetime() {
		return this.tarrangetime;
	}

	public void setTarrangetime(int tarrangetime) {
		this.tarrangetime = tarrangetime;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<Texam> getTexams() {
		return this.texams;
	}

	public void setTexams(List<Texam> texams) {
		this.texams = texams;
	}

	public Texaminee getTexaminee() {
		return this.texaminee;
	}

	public void setTexaminee(Texaminee texaminee) {
		this.texaminee = texaminee;
	}

	public List<Trepeat> getTrepeats() {
		return this.trepeats;
	}

	public void setTrepeats(List<Trepeat> trepeats) {
		this.trepeats = trepeats;
	}

	public Ttest getTtest() {
		return this.ttest;
	}

	public void setTtest(Ttest ttest) {
		this.ttest = ttest;
	}

	public List<Tasmission> getTasmissions() {
		return this.tasmissions;
	}

	public void setTasmissions(List<Tasmission> tasmissions) {
		this.tasmissions = tasmissions;
	}

	public List<Toverview> getToverviews() {
		return this.toverviews;
	}

	public void setToverviews(List<Toverview> toverviews) {
		this.toverviews = toverviews;
	}

	public Toverview addToverview(Toverview toverview) {
		getToverviews().add(toverview);
		toverview.setTarrange(this);

		return toverview;
	}

	public Toverview removeToverview(Toverview toverview) {
		getToverviews().remove(toverview);
		toverview.setTarrange(null);

		return toverview;
	}

	public List<Tscene> getTscenes() {
		return this.tscenes;
	}

	public void setTscenes(List<Tscene> tscenes) {
		this.tscenes = tscenes;
	}

	public Tscene addTscene(Tscene tscene) {
		getTscenes().add(tscene);
		tscene.setTarrange(this);

		return tscene;
	}

	public Tscene removeTscene(Tscene tscene) {
		getTscenes().remove(tscene);
		tscene.setTarrange(null);

		return tscene;
	}

}